using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Easy.Geo.Kml
{
    public abstract class Container : Feature
    {
        public Container() : base() { }
        public Container(string name) : base(name) { }
        public Container(string name, KBool visibility, KBool open)
            : base(name, visibility, open) { }
        public Container(string id, string name, KBool visibility, string address, 
            string description, string styleUrl, ExtendedData ExtendedData, KBool open, List<Feature> features)
            :base(id,name,visibility,address,description,styleUrl,ExtendedData,open)
        {
            this._features = features;
        }        
        private List<Feature> _features = new List<Feature>();        
        [XmlElement(ElementName="Placemark", Type=typeof(Placemark)),
         XmlElement(ElementName="Folder", Type=typeof(Folder)),
         XmlElement(ElementName="NetworkLink", Type=typeof(NetworkLink))]
        public List<Feature> Features
        {
            get { return _features; }
            set { _features = value; }
        }

        public void AddFeature(Feature feature)
        {
            this._features.Add(feature);            
        }
    }
}
